home *** CD-ROM | disk | FTP | other *** search
- package engine.levelData
- {
- import copy.CopyBank;
- import engine.WorldScene;
- import engine.dynamicObjects.*;
-
- public class Level_11 extends LevelData
- {
-
-
- public function Level_11()
- {
- super();
- _goalParameters = new Array();
- }
-
- override public function buildLevel() : *
- {
- var i:* = undefined;
- var rNum:* = undefined;
- var podium:* = undefined;
- var cage:* = undefined;
- var px:Number = NaN;
- var indian:* = undefined;
- var t:* = false;
- var tb:* = false;
- var fuelIcon:* = undefined;
- var goalObj:Object = null;
- var missionObj:Object = null;
- var giantTentacle:* = undefined;
- super.buildLevel();
- rNum = Math.random();
- t = false;
- for(i = 0; i < 20; i++)
- {
- rNum = Math.random();
- px = 150 + Math.random() * 75 + i * 200;
- podium = new Podium("tall");
- podium.x = px;
- podium.y = 700;
- WorldScene.Instance.GameplayObjects.push(podium);
- cage = new Cage1();
- cage.x = podium.x;
- cage.y = 568;
- WorldScene.Instance.GameplayObjects.push(cage);
- WorldScene.Instance.Cages.push(cage);
- }
- tb = false;
- for(i = 0; i < 20; i++)
- {
- if(t)
- {
- if(tb)
- {
- giantTentacle = new GiantTentacle();
- giantTentacle.r = -3;
- giantTentacle.baseX = i * 400;
- giantTentacle.baseY = 1200;
- giantTentacle.hiddenX = i * 400;
- giantTentacle.hiddenY = 1300;
- giantTentacle.init();
- WorldScene.Instance.TentacleObjects.push(giantTentacle);
- }
- else
- {
- giantTentacle = new GiantTentacle();
- giantTentacle.r = 0;
- giantTentacle.baseX = i * 400;
- giantTentacle.baseY = 0;
- giantTentacle.hiddenX = i * 400;
- giantTentacle.hiddenY = -300;
- giantTentacle.init();
- WorldScene.Instance.TentacleObjects.push(giantTentacle);
- }
- tb = !tb;
- }
- t = !t;
- }
- fuelIcon = new FuelIcon();
- fuelIcon.x = 4000;
- fuelIcon.y = 2000;
- WorldScene.Instance.GameplayObjects.push(fuelIcon);
- fuelIcon = new FuelIcon();
- fuelIcon.x = 5000;
- fuelIcon.y = 2000;
- WorldScene.Instance.GameplayObjects.push(fuelIcon);
- _missionDescription = CopyBank.Instance.MissionDesc_Cages;
- goalObj = {
- "Type":"Cage",
- "Count":20
- };
- _goalParameters.push(goalObj);
- missionObj = {
- "Description":_missionDescription,
- "BoundsX":_missionBoundsX,
- "BoundsHint":_missionBoundsHint,
- "GoalParamaters":_goalParameters,
- "PrimaryGoalType":"Cages",
- "StartLoc":{
- "x":7000,
- "y":400
- }
- };
- WorldScene.Instance.setMissionDetails(missionObj);
- }
- }
- }
-